package com.tedu.protocol.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @date 2023/4/19
 * @author liuhuan
 */
@Data
public class ContentParam {
    @ApiModelProperty(value = "id", required = false)
    private Integer id;

    @ApiModelProperty(value = "分类id", required = true)
    @NotNull(message = "分类id不能为空")
    private Integer categoryId;

    @ApiModelProperty(value = "作者", required = true)
    private String editor;

    @ApiModelProperty(value = "标题", required = true)
    @NotBlank(message = "标题不能为空")
    private String title;

    @ApiModelProperty(value = "摘要", required = true)
    @NotBlank(message = "摘要不能为空")
    private String brief;

    @ApiModelProperty(value = "关键字", required = true)
    @NotBlank(message = "关键字不能为空")
    private String keywords;

    @ApiModelProperty(value = "排序号", required = true)
    @NotNull(message = "排序号不能为空")
    private Integer sort;

    @ApiModelProperty(value = "封面图", required = true)
    @NotBlank(message = "封面图不能为空")
    private String coverUrl;

    @ApiModelProperty(value = "详情内容", required = true)
    @NotBlank(message = "详情内容不能为空")
    private String detail;
}
